<div class="div">
	<h1><?php echo $this->lang->line('personal_title'); ?></h1>
	<fieldset>
		<form id="register_form" onsubmit="return Candidate.updateCandidate();">
			<table class="table">
				<tbody>
					<tr>
						<td width="25%" class="right rlabel"><label for="firstname"><?php echo $this->lang->line('personal_name'); ?>:</label></td>
						<td><input type="text" class="inputtext" value="<?php echo $candidate->firstname; ?>" id="firstname" name="firstname"></td>
					</tr>
					<tr>
						<td class="right rlabel"><label for="lastname"><?php echo $this->lang->line('personal_lastname'); ?>:</label></td>
						<td><input type="text" class="inputtext" value="<?php echo $candidate->lastname; ?>" id="lastname" name="lastname"></td>
					</tr>
					<tr>
						<td class="right rlabel"><label for="idcard"><?php echo $this->lang->line('personal_idcard'); ?>:</label></td>
						<td><input type="text" class="inputtext maskCPF" value="<?php echo $candidate->idcard; ?>" id="idcard" name="idcard"></td>
					</tr>
					<tr>
						<td class="right rlabel"><label for="birthday"><?php echo $this->lang->line('personal_birthday'); ?>:</label></td>
						<td>
						<select class="input" id="birthday" name="birthday">
							<option value=""></option>	
							<?php 
								for ($i = 1; $i <= 31; $i++) {
									echo '<option value="'.$i.'">'.$i.'</option>';
								}
							?>
						</select> /
						<select class="input" id="birthmonth" name="birthmonth">
							<option value=""></option>
							<option value="1"><?php echo $this->lang->line('global_january'); ?></option>
							<option value="2"><?php echo $this->lang->line('global_february'); ?></option>
							<option value="3"><?php echo $this->lang->line('global_march'); ?></option>
							<option value="4"><?php echo $this->lang->line('global_april'); ?></option>
							<option value="5"><?php echo $this->lang->line('global_may'); ?></option>
							<option value="6"><?php echo $this->lang->line('global_june'); ?></option>
							<option value="7"><?php echo $this->lang->line('global_july'); ?></option>
							<option value="8"><?php echo $this->lang->line('global_august'); ?></option>
							<option value="9"><?php echo $this->lang->line('global_september'); ?></option>
							<option value="10"><?php echo $this->lang->line('global_october'); ?></option>
							<option value="11"><?php echo $this->lang->line('global_november'); ?></option>
							<option value="12"><?php echo $this->lang->line('global_december'); ?></option>
						</select> /
						<select class="input" id="birthyear" name="birthyear">
							<option value=""></option>	
							<?php 
								for ($i = date('Y'); $i >= 1900; $i--) {
									echo '<option value="'.$i.'">'.$i.'</option>';
								}
							?>
						</select>
						</td>
					</tr>
					<tr>
						<td class="right rlabel"><label for="idgenre"><?php echo $this->lang->line('personal_genre'); ?>:</label></td>
						<td><div id="personalGenre"></div></td>
					</tr>
					<tr>
						<td class="right rlabel"><label for="idmaritalstatus"><?php echo $this->lang->line('personal_maritalstatus'); ?>:</label></td>
						<td><div id="personalMaritalStatus"></div></td>
					</tr>
					<tr>
						<td class="right rlabel"><label for="idcountry"><?php echo $this->lang->line('personal_country'); ?>:</label></td>
						<td><div id="personalCountry"></div></td>
					</tr>
					<tr>
						<td class="right rlabel"><label for="iddrivelicense"><?php echo $this->lang->line('personal_drivelicense'); ?>:</label></td>
						<td><div id="personalDriveLicense"></div></td>
					</tr>
					<tr>
						<td class="right rlabel"><input type="checkbox" value="Y" name="idtravel" id="idtravel" class="checkbox"></td>
						<td colspan="3"><label for="idtravel"><?php echo $this->lang->line('personal_travel'); ?></label></td>
					</tr>
					<tr>
						<td class="right rlabel"><input type="checkbox" value="Y" name="idflit" id="idflit" class="checkbox"></td>
						<td colspan="3"><label for="idflit"><?php echo $this->lang->line('personal_flit'); ?></label></td>
					</tr>
					<tr>
						<td class="right rlabel"><input type="checkbox" value="Y" name="idhomeoffice" id="idhomeoffice" class="checkbox"></td>
						<td colspan="3"><label for="idhomeoffice"><?php echo $this->lang->line('personal_homeoffice'); ?></label></td>
					</tr>
					<tr>
						<td class="right rlabel"><input type="checkbox" value="Y" name="iddeficiency" id="iddeficiency" class="checkbox"></td>
						<td colspan="3"><label for="iddeficiency"><?php echo $this->lang->line('personal_deficiency'); ?></label></td>
					</tr>
					<tr>
						<td colspan="2" class="center">
							<label for="btnEnter"><input type="submit" id="btnEnter" class="submit" value="<?php echo $this->lang->line('personal_save'); ?>" /></label>
						</td>
					</tr>
				</tbody>
			</table>
			<div id="result"></div>
		</form>
	</fieldset>
	
	<fieldset>
	<legend><?php echo $this->lang->line('personal_language'); ?></legend>
		<div>
			<div id="gridLanguage"></div>
		</div>
		<div class="gadd">
			<a href="<?php echo base_url(); ?>candidate/language/add" rel="facebox"><?php echo $this->lang->line('personal_languageadd'); ?></a>
		</div>
	</fieldset>
	
	<fieldset>
	<legend><?php echo $this->lang->line('personal_address'); ?></legend>
		<div>
			<div id="gridAddress"></div>
		</div>
		<div class="gadd">
			<a href="<?php echo base_url(); ?>candidate/address/add" rel="facebox"><?php echo $this->lang->line('personal_addressadd'); ?></a>
		</div>
	</fieldset>
	
	<fieldset>
	<legend><?php echo $this->lang->line('personal_phone'); ?></legend>
		<div>
			<div id="gridPhone"></div>
		</div>
		<div class="gadd"><a href="<?php echo base_url(); ?>candidate/phone/add" rel="facebox"><?php echo $this->lang->line('personal_phoneadd'); ?></a></div>
	</fieldset>
	
	<fieldset>
	<legend><?php echo $this->lang->line('personal_site'); ?></legend>
		<div>
			<div id="gridSite"></div>
		</div>
		<div class="gadd">
			<a href="<?php echo base_url(); ?>candidate/site/add" rel="facebox"><?php echo $this->lang->line('personal_siteadd'); ?></a>
		</div>
	</fieldset>
	<br/>
	<a onclick="history.back();"><?php echo $this->lang->line('global_back'); ?></a>
</div>
<script type="text/javascript" src="<?php echo base_url(); ?>js/views/candidate/candidate.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>js/views/candidate/candidate_language.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>js/views/candidate/candidate_address.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>js/views/candidate/candidate_phone.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>js/views/candidate/candidate_site.js"></script>
<script type="text/javascript">
	CandidateLanguage.getLanguageGrid();
	CandidateAddress.getAddressGrid();
	CandidatePhone.getPhoneGrid();
	CandidateSite.getSiteGrid();
	$(".maskCPF").mask("999.999.999-99");
	Candidate.getGenre();
	Candidate.getMaritalStatus();
	getCountry('#personalCountry');
	Candidate.getDriveLicense();
	<?php 
		if (isset($extrascript)) echo $extrascript;
	?>
</script>